import { inject, observer } from "mobx-react";
import React, { Component } from "react";

@inject('apple')
@observer
class AddApple extends Component {
  render() {
    const { pickApple, isPicking } = this.props.apple
    return (
      <div className="btn-div">
        <button className={isPicking ? 'disabled' : ''} onClick={pickApple}>{isPicking ? '采摘中' : '摘苹果'}</button>
      </div>
    );
  }
}

export default AddApple
